package com.codeZ.ObserverPattern.instance;

/**
 * 模拟买房摇号服务
 *
 * @author codeZhang
 * @Date 2024/8/26 10:46
 */
public class DrawHouseService {

    public String lots(String uId) {
        if (uId.hashCode() % 2 == 0) {
            return "恭喜ID为: " + uId + " 的用户,在本次摇号中中签! !";
        } else {
            return "很遗憾,ID为: " + uId + "的用户,您本次未中签! !";
        }
    }

}
